package com.jvyou.app.ds.domain.dto;

import com.jvyou.app.ds.domain.entity.SparkMessage;
import lombok.Data;

import java.util.List;
import java.util.Map;

/**
 * 星火消息请求信息
 *
 * @author 橘柚
 * @since 2024/12/20 12:25
 */
@Data
public class SparkRequestDto {

    private String model;
    private String user;
    private List<SparkMessage> messages;
    private Double temperature;
    private Integer topK;
    private Boolean stream;
    private Integer maxTokens;
    private Integer presencePenalty;
    private Integer frequencyPenalty;
    private List<Tool> tools;
    private ResponseFormat responseFormat;
    private List<String> suppressPlugin;


    @Data
    public static class Tool {
        private String type;
        private Function function;
        private WebSearch webSearch;
    }

    @Data
    public static class Function {
        private String name;
        private String description;
        private Map<String, Object> parameters;
    }

    @Data
    public static class WebSearch {
        private Boolean enable;
    }

    @Data
    public static class ResponseFormat {
        private String type;
    }
}
